export const directives = {
  checkImg: {
    mounted(el, binding) {
      el.onerror = () => {
        binding.value.isHide = true;
      };
    }
  }
};

export const registerDirective = (app) => {
  Object.keys(directives).forEach((directive) => {
    app.directive(directive, directives[directive]);
  });
};
